package drds.binlog.parse.driver.socket;

import java.io.IOException;
import java.net.SocketAddress;


public interface SocketChannel
{
    public SocketAddress getLocalSocketAddress();

    public SocketAddress getRemoteSocketAddress();

    //
    public boolean isConnected();

    //
    public void write(byte[]... bytes) throws IOException;

    //
    public byte[] read(int readSize) throws IOException;

    public byte[] read(int readSize, int timeout) throws IOException;

    //
    public void read(byte[] bytes, int offset, int length, int timeout) throws IOException;

    //
    public void close();
}
